package com.pubinfo.passbook.data.controller.forward;

import com.pubinfo.passbook.common.model.vo.base.JsonResult;
import com.pubinfo.passbook.data.service.TFeedbackFileService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

@RestController
@RequestMapping(value = "FeedbackFile")
@Api(tags = "用户反馈文件保存")
@Slf4j
public class TFeedbackFileController
{
    @Autowired
    TFeedbackFileService tFeedbackFileService;

    @PostMapping("/saveFeedbackFile")
    @ApiOperation(value = "保存用户上传的反馈图片")
    public JsonResult<Boolean> saveFeedbackFile(List<MultipartFile> multipartFiles, String feedbackId) throws IOException {
        return JsonResult.success(tFeedbackFileService.saveFeedbackFile(multipartFiles,feedbackId));
    }
}
